current_room = argument0;
enemy_count = argument1;

seed = random_range(0,100);

switch(current_room){
    case room0:
        if (seed<20){
            e_type = "wenzi";
        }else if (seed<40){ 
            e_type = "cangying";
        }else if(seed<55){
            e_type = "mafeng";
        }else if (seed<70){
            e_type = "maochong";
        }else if (seed<80){
            e_type = "zhizhu";
        }else if (seed <90){
            e_type = "zhanglang";
        }else if (seed<95){
            e_type = "jiakechong";
        }
        else{
            e_type = "lanjiakechong";
        }
        break;
    case room1:
        if (seed<20){
            e_type = "wenzi";
        }else if (seed<40){ 
            e_type = "cangying";
        }else if(seed<55){
            e_type = "mafeng";
        }else if (seed<70){
            e_type = "maochong";
        }else if (seed<80){
            e_type = "zhizhu";
        }else if (seed <90){
            e_type = "zhanglang";
        }else if (seed<95){
            e_type = "jiakechong";
        }
        else{
            e_type = "lanjiakechong";
        }
        break;
    case room2:
        if (seed<20){
            e_type = "wenzi";
        }else if (seed<40){ 
            e_type = "cangying";
        }else if(seed<55){
            e_type = "mafeng";
        }else if (seed<70){
            e_type = "maochong";
        }else if (seed<80){
            e_type = "zhizhu";
        }else if (seed <90){
            e_type = "zhanglang";
        }else if (seed<95){
            e_type = "jiakechong";
        }
        else{
            e_type = "lanjiakechong";
        }
        break;
    case room3:
        if (seed<20){
            e_type = "wenzi";
        }else if (seed<40){ 
            e_type = "cangying";
        }else if(seed<55){
            e_type = "mafeng";
        }else if (seed<70){
            e_type = "maochong";
        }else if (seed<80){
            e_type = "zhizhu";
        }else if (seed <90){
            e_type = "zhanglang";
        }else if (seed<95){
            e_type = "jiakechong";
        }
        else{
            e_type = "lanjiakechong";
        }
        break;
    case room4:
        if (seed<20){
            e_type = "wenzi";
        }else if (seed<40){ 
            e_type = "cangying";
        }else if(seed<55){
            e_type = "mafeng";
        }else if (seed<70){
            e_type = "maochong";
        }else if (seed<80){
            e_type = "zhizhu";
        }else if (seed <90){
            e_type = "zhanglang";
        }else if (seed<95){
            e_type = "jiakechong";
        }
        else{
            e_type = "lanjiakechong";
        }
        break;
}

custom_create_enemy(enemy_count,e_type);
